apollo_node_config,apollo_deployments: assert cross-component equality for formerly-pointer-resolved fields#14650
Draft
nimrod-starkware wants to merge 1 commit into
Conversation
This was referenced Jun 28, 2026
Contributor
Author
This was referenced Jun 28, 2026
a4eefa9 to
ec8f72b
Compare
5257d79 to
e1fdf85
Compare
ec8f72b to
9ecf4fe
Compare
e1fdf85 to
614e204
Compare
…y for formerly-pointer-resolved fields CONFIG_POINTERS copies one source value into N component fields at load. Before that resolution is deleted, add a present-only validator::Validate check (in cross_member_validations) asserting those fields are equal across PRESENT components, so hand-edited/test/non-jsonnet configs can't silently carry divergent values. 10 equality groups derived from CONFIG_POINTERS (chain_id; eth/strk fee tokens incl. the *_fee_token_address vs *_fee_contract_address name asymmetry; recorder_url; native_classes_whitelist; validate_resource_bounds; max_cpu_time; behavior_mode; versioned_constants_overrides; revert_config), plus validation_only: a single-target pointer whose target (the batcher's copy, which drives batcher behavior) is checked against the always-present top-level source field. Skips starknet_url (String vs Url) and validator_id (lone target with no independent source). New all_present_equal helper compares present Option<&T>. Enforce the invariant in CI: build_*_deserializes_into_node_config now calls validate_node_config() on the build() output for every layout (not just deserializes), so a jsonnet change that breaks a pointer group fails CI instead of only at prod boot. Component urls are deploy-time placeholders (in-cluster DNS that won't resolve), so the test rewrites them to localhost before validating, reaching the cross-component checks. Verified the build() native config passes the check for all layouts (no regression); negative tests prove the guard fires (incl. validation_only). Raw SequencerNodeConfig::default() is cross-target inconsistent (only pointer resolution reconciled it), so tests reconcile via a normalize_pointer_groups helper. apollo_node_config 35/35, apollo_deployments 8/8 green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9ecf4fe to
e84d1fc
Compare
614e204 to
b42f836
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

CONFIG_POINTERS copies one source value into N component fields at load. Before that
resolution is deleted, add a present-only validator::Validate check (in
cross_member_validations) asserting those fields are equal across PRESENT components, so
hand-edited/test/non-jsonnet configs can't silently carry divergent values. 10 equality
groups derived from CONFIG_POINTERS (chain_id; eth/strk fee tokens incl. the
*_fee_token_address vs *_fee_contract_address name asymmetry; recorder_url;
native_classes_whitelist; validate_resource_bounds; max_cpu_time; behavior_mode;
versioned_constants_overrides; revert_config), plus validation_only: a single-target
pointer whose target (the batcher's copy, which drives batcher behavior) is checked
against the always-present top-level source field. Skips starknet_url (String vs Url) and
validator_id (lone target with no independent source). New all_present_equal helper
compares present Option<&T>.
Enforce the invariant in CI: build_*_deserializes_into_node_config now calls
validate_node_config() on the build() output for every layout (not just deserializes), so
a jsonnet change that breaks a pointer group fails CI instead of only at prod boot.
Component urls are deploy-time placeholders (in-cluster DNS that won't resolve), so the
test rewrites them to localhost before validating, reaching the cross-component checks.
Verified the build() native config passes the check for all layouts (no regression);
negative tests prove the guard fires (incl. validation_only). Raw
SequencerNodeConfig::default() is cross-target inconsistent (only pointer resolution
reconciled it), so tests reconcile via a normalize_pointer_groups helper. apollo_node_config
35/35, apollo_deployments 8/8 green.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com